home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / xlib03.zip / DEMO.C < prev    next >
C/C++ Source or Header  |  1993-04-05  |  17KB  |  456 lines

  1. /* VERY QUICK AND ULTRA-DIRTY DEMO USING XLIB */
  2.  
  3. /* Simple Demo of MODE X Split screen and panning  */
  4. /* Compile using Turbo C and Tasm                  */
  5.  
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #include <conio.h>
  9. #include <ctype.h>
  10. #include <alloc.h>
  11. #include <dos.h>
  12. #include "Xlib_all.h"
  13.  
  14. #define MAX_OBJECTS  10
  15.  
  16. typedef struct {
  17.    int X,Y,Width,Height,XDir,YDir,XOtherPage,YOtherPage;
  18.    char far * Image;
  19.    char far * bg;
  20.    char far * bgOtherPage;
  21. } AnimatedObject;
  22.  
  23. AnimatedObject objects[MAX_OBJECTS];
  24. int object_count=0;
  25.  
  26. static char  bm[] = {4,12,
  27.   /* plane 0 */
  28.   2,2,2,2,2,1,1,1,2,1,1,1,2,3,3,1,
  29.   2,0,0,3,2,0,0,3,2,0,0,3,2,0,0,3,
  30.   2,3,3,1,2,1,1,1,2,1,1,1,2,2,2,2,
  31.   /* plane 1 */
  32.   2,2,2,2,1,1,1,1,1,1,1,1,1,3,3,1,
  33.   1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,
  34.   1,3,3,1,1,1,1,1,1,1,1,1,2,2,2,2,
  35.   /* plane 2 */
  36.   2,2,2,2,1,1,1,1,1,1,1,1,1,3,3,1,
  37.   1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,
  38.   1,3,3,1,1,1,1,1,1,1,1,1,2,2,2,2,
  39.   /* plane 3 */
  40.   2,2,2,2,1,1,1,2,1,1,1,2,1,3,3,2,
  41.   3,0,0,2,3,0,0,2,3,0,0,2,3,0,0,2,
  42.   1,3,3,2,1,1,1,2,1,1,1,2,2,2,2,2};
  43.  
  44. static char  bm2[] = {4,12,
  45.    /* plane 0 */
  46.    2,2,2,2,2,4,4,4,2,4,4,4,2,2,2,4,
  47.    2,0,0,2,2,0,0,2,2,0,0,2,2,0,0,2,
  48.    2,2,2,4,2,4,4,4,2,4,4,4,2,2,2,2,
  49.    /* plane 1 */
  50.    2,2,2,2,4,4,4,4,4,4,4,4,4,2,2,4,
  51.    4,0,0,4,4,0,0,4,4,0,0,4,4,0,0,4,
  52.    4,2,2,4,4,4,4,4,4,4,4,4,2,2,2,2,
  53.    /* plane 2 */
  54.    2,2,2,2,4,4,4,4,4,4,4,4,4,2,2,4,
  55.    4,0,0,4,4,0,0,4,4,0,0,4,4,0,0,4,
  56.    4,2,2,4,4,4,4,4,4,4,4,4,2,2,2,2,
  57.    /* plane 2 */
  58.    2,2,2,2,4,4,4,2,4,4,4,2,4,2,2,2,
  59.    2,0,0,2,2,0,0,2,2,0,0,2,2,0,0,2,
  60.    4,2,2,2,4,4,4,2,4,4,4,2,2,2,2,2};
  61.  
  62.  
  63. /* initialize a new object */
  64. void init_object(int x,int y,int width, int height, int xdir, int ydir,
  65.   char far * image){
  66.   int i;
  67.   objects[object_count].X = objects[object_count].XOtherPage = x;
  68.   objects[object_count].Y = objects[object_count].YOtherPage = y;
  69.   objects[object_count].Width = width;
  70.   objects[object_count].Height = height;
  71.   objects[object_count].XDir = xdir;
  72.   objects[object_count].YDir = ydir;
  73.   objects[object_count].Image = image;
  74.   objects[object_count].bg = (char far *) farmalloc(4*width*height+20);
  75.   objects[object_count].bgOtherPage = (char far *) farmalloc(4*width*height+20);
  76.   x_get_pbm(x,y,(unsigned)width,height,VisiblePageOffs,
  77.     objects[object_count].bg);
  78.   x_get_pbm(x,y,(unsigned)width,height,HiddenPageOffs,
  79.     objects[object_count].bgOtherPage);
  80.   object_count++;
  81. }
  82.  
  83. /* Move the specified object, bouncing at the edges of the screen and
  84.    remembering where the object was before the move for erasing next time */
  85. void MoveObject(AnimatedObject * ObjectToMove) {
  86.    int X, Y;
  87.    char far *cptr;
  88.    X = ObjectToMove->X + ObjectToMove->XDir;
  89.    Y = ObjectToMove->Y + ObjectToMove->YDir;
  90.    if ((X < 0) || (X > (ScrnLogicalPixelWidth-((ObjectToMove->Width)<<2)))) {
  91.       ObjectToMove->XDir = -ObjectToMove->XDir;
  92.       X = ObjectToMove->X + ObjectToMove->XDir;
  93.    }
  94.    if ((Y < 0) || (Y > (ScrnLogicalHeight-ObjectToMove->Height))) {
  95.       ObjectToMove->YDir = -ObjectToMove->YDir;
  96.       Y = ObjectToMove->Y + ObjectToMove->YDir;
  97.    }
  98.    /* Remember previous location for erasing purposes */
  99.    ObjectToMove->XOtherPage = ObjectToMove->X;
  100.    ObjectToMove->YOtherPage = ObjectToMove->Y;
  101.    ObjectToMove->X = X; /* set new location */
  102.    ObjectToMove->Y = Y;
  103.    cptr = ObjectToMove->bg;
  104.    ObjectToMove->bg = ObjectToMove->bgOtherPage;
  105.    ObjectToMove->bgOtherPage = cptr;
  106. }
  107.  
  108. void animate(){
  109.  int i;
  110.  for(i=object_count-1;i>=0;i--){
  111.   x_put_pbm(objects[i].XOtherPage,objects[i].YOtherPage,
  112.      HiddenPageOffs,objects[i].bgOtherPage);
  113.  }
  114.  for(i=0;i<object_count;i++){
  115.   MoveObject(&objects[i]);
  116.  
  117.   x_get_pbm(objects[i].X,objects[i].Y,
  118.     (unsigned)objects[i].Width,objects[i].Height,HiddenPageOffs,
  119.     objects[i].bg);
  120.   x_put_masked_pbm(objects[i].X,objects[i].Y,HiddenPageOffs,
  121.     objects[i].Image);
  122.  }
  123. }
  124.  
  125. void clear_objects(){
  126.  int i;
  127.  for(i=object_count-1;i>=0;i--){
  128.   x_put_pbm(objects[i].XOtherPage,objects[i].YOtherPage,
  129.      HiddenPageOffs,objects[i].bgOtherPage);
  130.  }
  131. }
  132.  
  133. /* draw a coloured rectangle */
  134.  
  135. void draw_rect(int x, int y, int width, int color, unsigned int page){
  136.  int i,j;
  137.  for (j=0;j<width;j++)
  138.    for(i=0;i<width;i++){
  139.      x_put_pix(x+j,y+i,page,color);
  140.    }
  141. }
  142.  
  143.  
  144. int textwindow_x=0,textwindow_y=0;
  145. char far * pal,far * pal2;
  146. char palscrolldir=1;
  147. char far * newfnt;
  148.  
  149.  
  150. void textwindow(int Margin){
  151.    int x0=0+Margin;
  152.    int y0=0+Margin;
  153.    int x1=ScrnPhysicalPixelWidth-Margin;
  154.    int y1=ScrnPhysicalHeight-Margin;
  155.    x_rect_fill(x0, y0, x1,y1,Page0_Offs,1);
  156.    x_line(x0,y0,x1,y0,2,Page0_Offs);
  157.    x_line(x0,y1,x1,y1,2,Page0_Offs);
  158.    x_line(x0,y0,x0,y1,2,Page0_Offs);
  159.    x_line(x1,y0,x1,y1,2,Page0_Offs);
  160.    x_line(x0+2,y0+2,x1-2,y0+2,2,Page0_Offs);
  161.    x_line(x0+2,y1-2,x1-2,y1-2,2,Page0_Offs);
  162.    x_line(x0+2,y0+2,x0+2,y1-2,2,Page0_Offs);
  163.    x_line(x1-2,y0+2,x1-2,y1-2,2,Page0_Offs);
  164.    textwindow_x=x0;
  165.    textwindow_y=y0;
  166.  
  167. }
  168.  
  169.  
  170. void wait_for_keypress(){
  171.   while(kbhit()) getch();
  172.   palscrolldir^=1;
  173.   do {
  174.     x_rot_pal_struc(pal,palscrolldir);
  175.     x_put_pal_struc(pal);
  176.   } while (!kbhit());
  177.   while(kbhit()) getch();
  178.  
  179. }
  180.  
  181.  
  182. void intro_1(){
  183.   x_set_rgb(1,40,40,40); /* BG Gray */
  184.   x_set_rgb(2,63,63,0);  /* Bright Yellow  */
  185.   x_set_rgb(3,63,0,0);   /* Bright Red     */
  186.   x_set_rgb(4,0,63,0);   /* Bright Green   */
  187.   x_set_rgb(5,0,0,63);   /* Bright Blue    */
  188.   x_set_rgb(6,0,0,28);   /* Dark Blue      */
  189.   x_set_rgb(7,0,28,0);   /* Dark Green     */
  190.   x_set_rgb(8,28,0,0);   /* Dark red       */
  191.   x_set_rgb(9,0,0,38);   /* Med Blue       */
  192.  
  193.   textwindow(20);
  194.   x_set_font(1);
  195.   x_printf(textwindow_x+54,textwindow_y+4,Page0_Offs,6,"    XLIB Version 3.0");
  196.   x_printf(textwindow_x+53,textwindow_y+3,Page0_Offs,2,"    XLIB Version 3.0");
  197.   x_set_font(0);
  198.   x_printf(textwindow_x+24,textwindow_y+18,Page0_Offs,6,"      Not the Unix version");
  199.   x_printf(textwindow_x+23,textwindow_y+17,Page0_Offs,2,"      Not the Unix version");
  200.  
  201.   x_printf(textwindow_x+24,168,Page0_Offs,6,"    Press any key to continue");
  202.   x_printf(textwindow_x+23,167,Page0_Offs,2,"    Press any key to continue");
  203. }
  204.  
  205. void subsequent_page(){
  206.   textwindow(20);
  207.   x_set_font(1);
  208.   x_printf(textwindow_x+54,textwindow_y+4,Page0_Offs,6,"    XLIB Version 3.0");
  209.   x_printf(textwindow_x+53,textwindow_y+3,Page0_Offs,2,"    XLIB Version 3.0");
  210.   x_set_font(0);
  211.   x_printf(textwindow_x+24,168,Page0_Offs,6,"    Press any key to continue");
  212.   x_printf(textwindow_x+23,167,Page0_Offs,2,"    Press any key to continue");
  213. }
  214.  
  215. void load_user_fonts(){
  216.   FILE *f;
  217.   f=fopen("6x8b.fnt","rb");
  218.   /* read char by char as fread wont read to far pointers in small model */
  219.   { int i; char c;
  220.     for (i=0;i<256*8+4;i++){
  221.       fread(&c,1,1,f);
  222.       *(newfnt+i)=c;
  223.     }
  224.   }
  225.  
  226.   fclose(f);
  227.   x_register_userfont(newfnt);
  228.  
  229. }
  230.  
  231. void main(){
  232.   int  i, j, xinc, yinc, Margin;
  233.   char ch;
  234.   WORD curr_x=0, curr_y=0;
  235.  
  236.   pal    = (char far *) farmalloc(256*3);
  237.   pal2   = (char far *) farmalloc(256*3);
  238.   newfnt = (char far *) farmalloc(256*16+4);
  239.  
  240.   /* setup Mode X 320x240x256 with a logical width of ~ 500 pixels        */
  241.   /* we actually get 496 due to the fact that the width must be divisible */
  242.   /* by 8                                       */
  243.  
  244.  
  245.   /* INITIALIZE XLIB */
  246.  
  247.   x_set_mode(X_MODE_360x200,500);           /* actually is set to 496      */
  248.   x_set_splitscreen(ScrnPhysicalHeight-60); /* split screen 60 pixels high */
  249.   x_set_doublebuffer(220);
  250.   x_text_init();
  251.   x_hide_splitscreen();
  252.  
  253.   /* DRAW BACKGROUND LINES */
  254.  
  255.   for(j=0;j<ScrnPhysicalHeight;j++){
  256.    x_line(0,j,ScrnLogicalPixelWidth,j,16+(j%239),Page0_Offs);
  257.   }
  258.  
  259.  
  260.   x_get_pal_struc(pal, 240,16);
  261.   load_user_fonts();
  262.  
  263.   getch();
  264.   intro_1();
  265.   x_set_font(2);
  266.  
  267.   x_printf(textwindow_x+5,50   ,Page0_Offs,9, " Hi folks, this is yet another FREEWARE Mode X  ");
  268.   x_printf(textwindow_x+5,50+8 ,Page0_Offs,9, " graphics library. It is by no means complete,  ");
  269.   x_printf(textwindow_x+5,50+16,Page0_Offs,9, " but I believe it contains a rich enough set of ");
  270.   x_printf(textwindow_x+5,50+24,Page0_Offs,9, " functions to achieve it's design goal - To be  ");
  271.   x_printf(textwindow_x+5,50+32,Page0_Offs,9, "    a game development oriented library for     ");
  272.   x_printf(textwindow_x+5,50+40,Page0_Offs,9, "    Borland TC/BC/BC++ and TASM programmers.    ");
  273.  
  274.   x_printf(textwindow_x+5,50+48,Page0_Offs,9, " This library comes with TASM and C  sources and ");
  275.   x_printf(textwindow_x+5,50+56,Page0_Offs,9, "  was inspired by DDJ Graphics column and many    ");
  276.   x_printf(textwindow_x+5,50+64,Page0_Offs,9, "    INTERNET an USENET Authors who unlike the     ");
  277.   x_printf(textwindow_x+5,50+72,Page0_Offs,9, " majority of programmers, (you know who you are!)");
  278.   x_printf(textwindow_x+5,50+80,Page0_Offs,9, " willingly share their code and ideas with others.");
  279.  
  280.   x_printf(textwindow_x+5,50+88,Page0_Offs,9, "   I can't afford to nor do I want to copyright  ");
  281.   x_printf(textwindow_x+5,50+96,Page0_Offs,9, " this code, but if you use it, some credit would ");
  282.   x_printf(textwindow_x+5,50+104,Page0_Offs,9," be appreciated. ");
  283.  
  284.   wait_for_keypress();
  285.  
  286.   subsequent_page();
  287.   x_set_font(0);
  288.   x_printf(textwindow_x+24,textwindow_y+18,Page0_Offs,6,"Supported 256 colour resolutions.");
  289.   x_printf(textwindow_x+23,textwindow_y+17,Page0_Offs,3,"Supported 256 colour resolutions.");
  290.   x_set_font(2);
  291.   x_printf(textwindow_x+5,50   ,Page0_Offs,9, " 320x200   Standard for games       ~ 4 pages");
  292.   x_printf(textwindow_x+5,50+8 ,Page0_Offs,9, " 320x240   DDJ Mode X square pixels ~ 3.5 pages");
  293.   x_printf(textwindow_x+5,50+16,Page0_Offs,9, " 360x200   My favourite for games   ~ 3 pages  ");
  294.   x_printf(textwindow_x+5,50+24,Page0_Offs,9, " 360x240                            ~ 2.8 pages");
  295.   x_printf(textwindow_x+5,50+32,Page0_Offs,9, " 320x400                            ~ 2 pages  ");
  296.   x_printf(textwindow_x+5,50+40,Page0_Offs,9, " 320x480   All subsequent modes support less than");
  297.   x_printf(textwindow_x+5,50+48,Page0_Offs,9, " 360x400   two pages.");
  298.   x_printf(textwindow_x+5,50+56,Page0_Offs,9, " 360x480 ");
  299.   x_printf(textwindow_x+5,50+64,Page0_Offs,9, "All modes may not be suitable for your requirements");
  300.   x_printf(textwindow_x+5,50+72,Page0_Offs,9, "remember that standard vga only supports 64K of    ");
  301.   x_printf(textwindow_x+5,50+80,Page0_Offs,9, "video RAM and these modes are specifically designed");
  302.   x_printf(textwindow_x+5,50+88,Page0_Offs,9, "for standard VGA cards and monitors.");
  303.   x_printf(textwindow_x+5,50+96,Page0_Offs,2, "         We are currently in 320x200 mode.");
  304.  
  305.  
  306.  
  307.  
  308.   wait_for_keypress();
  309.  
  310.   subsequent_page();
  311.   x_printf(textwindow_x+24,textwindow_y+18,Page0_Offs,6,"    Text display functions.");
  312.   x_printf(textwindow_x+23,textwindow_y+17,Page0_Offs,3,"    Text display functions.");
  313.   x_set_font(2);
  314.   x_printf(textwindow_x+5,50   ,Page0_Offs,9, " Functions for text printing are provided that  ");
  315.   x_printf(textwindow_x+5,50+8 ,Page0_Offs,9, " support the VGA ROM 8x14 and 8x8 fonts as well ");
  316.   x_printf(textwindow_x+5,50+16,Page0_Offs,9, " as user defined fonts (like this 6x8 font).    ");
  317.   x_printf(textwindow_x+5,50+24,Page0_Offs,9, " Furthermore a function similar to printf is    ");
  318.   x_printf(textwindow_x+5,50+32,Page0_Offs,9, " provided that provides formatted text output.  ");
  319.   x_set_font(1);
  320.   x_printf(textwindow_x+5,50+42,Page0_Offs,2, "  ROM 8x14");
  321.   x_set_font(0);
  322.   x_printf(textwindow_x+5,50+46,Page0_Offs,2, "            ROM 8x8");
  323.   x_set_font(2);
  324.   x_printf(textwindow_x+5,50+46,Page0_Offs,2, "                            User defined 6x8 ");
  325.  
  326.   wait_for_keypress();
  327.  
  328.  
  329.   subsequent_page();
  330.   x_printf(textwindow_x+24,textwindow_y+18,Page0_Offs,6,"  Advanced screen functions");
  331.   x_printf(textwindow_x+23,textwindow_y+17,Page0_Offs,3,"  Advanced screen functions");
  332.   x_set_font(2);
  333.   x_printf(textwindow_x+5,50   ,Page0_Offs,9, " The library supports virtual screens larger   ");
  334.   x_printf(textwindow_x+5,50+8 ,Page0_Offs,9, " than the physical screen, panning of such     ");
  335.   x_printf(textwindow_x+5,50+16,Page0_Offs,9, " screens, and a split screen option. All of the ");
  336.   x_printf(textwindow_x+5,50+24,Page0_Offs,9, " above functions can be used together or       ");
  337.   x_printf(textwindow_x+5,50+32,Page0_Offs,9, " in isolation, and in the lower resolutions    ");
  338.   x_printf(textwindow_x+5,50+40,Page0_Offs,9, "double buffering can also be accomplished.     ");
  339.  
  340.   x_rect_fill(0, 0, ScrnPhysicalPixelWidth,60,SplitScrnOffs,5);
  341.   x_line(0,0,ScrnPhysicalPixelWidth,0,2,SplitScrnOffs);
  342.   x_set_font(1);
  343.   x_printf(10,10,SplitScrnOffs,2, " This is a split screen, Tops for scores.");
  344.   x_set_font(0);
  345.   for (i=ScrnPhysicalHeight;i>ScrnPhysicalHeight-60;i--){
  346.     x_adjust_splitscreen(i);
  347.   }
  348.   x_printf(10,25,SplitScrnOffs,2, " Even better for scrolling games etc.");
  349.  
  350.  
  351.   x_cp_vid_rect(0,0,ScrnLogicalPixelWidth,ScrnLogicalHeight,0,0,
  352.         VisiblePageOffs,HiddenPageOffs,
  353.         ScrnLogicalPixelWidth,ScrnLogicalPixelWidth);
  354.  
  355.   getch();
  356.  
  357.   curr_x=curr_y=0;
  358.  
  359.  
  360.   init_object(60,90,4, 12, -1, 1, MK_FP(FP_SEG(bm2),FP_OFF(bm2)));
  361.   init_object(30,30,4, 12, 1, 1, MK_FP(FP_SEG(bm),FP_OFF(bm)));
  362.   init_object(80,120,4, 12, 2, 1, MK_FP(FP_SEG(bm),FP_OFF(bm)));
  363.   init_object(300,200,4, 12, 1, -2, MK_FP(FP_SEG(bm),FP_OFF(bm)));
  364.   init_object(360,30,4, 12, -1, -1, MK_FP(FP_SEG(bm),FP_OFF(bm)));
  365.   init_object(360,10,4, 12, -2, 2, MK_FP(FP_SEG(bm),FP_OFF(bm)));
  366.  
  367.   while (!kbhit()){
  368.     animate();
  369.     if (objects[0].X>=curr_x+ScrnPhysicalPixelWidth-32 &&
  370.     curr_x < MaxScrollX) curr_x++;
  371.     else if (objects[0].X < curr_x+16 && curr_x > 0) curr_x--;
  372.     if (objects[0].Y>=curr_y+ScrnPhysicalHeight-92 &&
  373.        curr_y < MaxScrollY) curr_y++;
  374.     else if (objects[0].Y < curr_y+16 && curr_y > 0) curr_y--;
  375.     x_page_flip(curr_x,curr_y);
  376.   }
  377.  
  378.   clear_objects();
  379.   x_page_flip(curr_x,curr_y);
  380.  
  381.  
  382.   x_set_start_addr(0,0);
  383.  
  384. /*  if (VisiblePageIdx)
  385.     x_page_flip(0,0);
  386. */
  387.  
  388.   for (j=0;j<4;j++){
  389.     x_hide_splitscreen();
  390.     delay(100);
  391.     x_show_splitscreen();
  392.     delay(100);
  393.   }
  394.  
  395.  
  396.   for (i=ScrnPhysicalHeight-60;i<=ScrnPhysicalHeight;i++){
  397.     x_adjust_splitscreen(i);
  398.   }
  399.  
  400.  
  401.   subsequent_page();
  402.   x_printf(textwindow_x+24,textwindow_y+18,Page0_Offs,6,"      Palette functions.");
  403.   x_printf(textwindow_x+23,textwindow_y+17,Page0_Offs,3,"      Palette functions.");
  404.   x_set_font(2);
  405.   x_printf(textwindow_x+5,50   ,Page0_Offs,9, " A number of palette manipulation functions     ");
  406.   x_printf(textwindow_x+5,50+8 ,Page0_Offs,9, " are provided, you have already seen some of    ");
  407.   x_printf(textwindow_x+5,50+16,Page0_Offs,9, " them in action. Another common operation is    ");
  408.   x_printf(textwindow_x+5,50+24,Page0_Offs,9, " palette fading.                     ");
  409.  
  410.  
  411.   i=0;
  412.   ch=255;
  413.   while (x_cpcontrast_pal_struc(pal, pal2,ch-=1)){
  414.     x_put_pal_struc(pal2);
  415.     x_rot_pal_struc(pal,palscrolldir);
  416.     i++;
  417.   };
  418.   for (j=0;j<i;j++){
  419.     x_cpcontrast_pal_struc(pal, pal2,ch+=1);
  420.     x_put_pal_struc(pal2);
  421.     x_rot_pal_struc(pal,palscrolldir);
  422.   };
  423.   wait_for_keypress();
  424.  
  425.   subsequent_page();
  426.   x_printf(textwindow_x+24,textwindow_y+18,Page0_Offs,6," NEW Version 3.0 Functions!");
  427.   x_printf(textwindow_x+23,textwindow_y+17,Page0_Offs,3," NEW Version 3.0 Functions!");
  428.   x_set_font(2);
  429.   x_printf(textwindow_x+5,50   ,Page0_Offs,9, " NEW  functions not demonstrated here include:  ");
  430.   x_printf(textwindow_x+5,50+8 ,Page0_Offs,9, "  - RLE data compression                        ");
  431.   x_printf(textwindow_x+5,50+16,Page0_Offs,9, "  - FAST Compiled masked bitmaps (see demo2)    ");
  432.   x_printf(textwindow_x+5,50+24,Page0_Offs,9, "  - Hardware detection                          ");
  433.  
  434.   wait_for_keypress();
  435.  
  436.   subsequent_page();
  437.   x_printf(textwindow_x+24,textwindow_y+18,Page0_Offs,6,"      PLEASE... ");
  438.   x_printf(textwindow_x+23,textwindow_y+17,Page0_Offs,3,"      PLEASE...");
  439.   x_set_font(2);
  440.   x_printf(textwindow_x+5,50   ,Page0_Offs,9, " Please mention my name in programs that use XLIB  ");
  441.   x_printf(textwindow_x+5,50+8 ,Page0_Offs,9, " just to make me feel it was worth the effort.    .");
  442.   x_printf(textwindow_x+5,50+16,Page0_Offs,9, " If you have any bug to report please feel free to ");
  443.   x_printf(textwindow_x+5,50+24,Page0_Offs,9, " mail me a message. Any hints, suggestions and     ");
  444.   x_printf(textwindow_x+5,50+32,Page0_Offs,9, " contributions are welcome and encouraged.         ");
  445.  
  446.   x_printf(textwindow_x+5,50+56,Page0_Offs,9, " I have contributed this code to the public domain ");
  447.   x_printf(textwindow_x+5,50+64,Page0_Offs,9, " please respect my wishes and leave it there.      ");
  448.  
  449.   x_printf(textwindow_x+5,50+80,Page0_Offs,9, " Finally I hope you all find this stuff useful,");
  450.   x_printf(textwindow_x+5,50+96,Page0_Offs,9, " Themie Gouthas - EGG@DSTOS3.DSTO.GOV.AU");
  451.  
  452.   wait_for_keypress();
  453.  
  454.   x_text_mode();
  455. }
  456.